﻿using System.Collections.Generic;
using ZilLion.Service.Core.DapperWrapper;
using ZilLion.Service.WeChatMall.Domain.Entitys.GsInfo;

namespace ZilLion.Service.WeChatMall.Domain.Repositorys.Interface.GoodInfo
{
    public interface IGsBasicInfoRepository
    {
        /// <summary>
        ///     根据appid 获取app下属店铺信息
        /// </summary>
        /// <param name="appid"></param>
        /// <returns></returns>
        IEnumerable<GsBasicInfoEntity> GetGsBasicInfoByAppId(string appid);

        /// <summary>
        ///     根据shopid 获取app下属货品信息
        /// </summary>
        /// <param name="shopid"></param>
        /// <returns></returns>
        IEnumerable<GsBasicInfoEntity> GetGsBasicInfoByShopid(long shopid);

        /// <summary>
        ///     根据groupid 获取下属货品信息
        /// </summary>
        /// <param name="groupid"></param>
        /// <returns></returns>
        IEnumerable<GsBasicInfoEntity> GetGsBasicInfoByGroupid(long groupid);
        /// <summary>
        /// 获取所有货品信息
        /// </summary>
        /// <returns></returns>
        IEnumerable<GsBasicInfoEntity> GetAllgs();
        /// <summary>
        ///     根据gsid 删除数据
        /// </summary>
        /// <param name="gsid"></param>
        void RemoveByGsid(long gsid, UnitOfWork unit = null);

        /// <summary>
        ///     根据ID 获得货品信息
        /// </summary>
        /// <param name="gsid"></param>
        /// <returns></returns>
        GsBasicInfoEntity GetGsEntityById(long gsid);

        /// <summary>
        ///     新增
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="unit"></param>
        void AddGs(GsBasicInfoEntity entity, UnitOfWork unit = null);

        /// <summary>
        ///     修改
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="unit"></param>
        void EditGs(GsBasicInfoEntity entity, UnitOfWork unit = null);

        /// <summary>
        ///     删除
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="unit"></param>
        void RemoveGs(GsBasicInfoEntity entity, UnitOfWork unit = null);
    }
}